namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0096 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.SysTaskHistoryMessage",
                c => new
                    {
                        TaskHistoryMessageId = c.Int(nullable: false, identity: true),
                        TaskHistoryId = c.Int(nullable: false),
                        MessageText = c.String(),
                        Completed = c.Boolean(nullable: false),
                        AllowEdit = c.Boolean(nullable: false),
                    })
                .PrimaryKey(t => t.TaskHistoryMessageId)
                .ForeignKey("dbo.SysTaskHistory", t => t.TaskHistoryId, cascadeDelete: true)
                .Index(t => t.TaskHistoryId);
            
        }
        
        public override void Down()
        {
            DropIndex("dbo.SysTaskHistoryMessage", new[] { "TaskHistoryId" });
            DropForeignKey("dbo.SysTaskHistoryMessage", "TaskHistoryId", "dbo.SysTaskHistory");
            DropTable("dbo.SysTaskHistoryMessage");
        }
    }
}
